package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CreditWaterActivityMapper;
import com.ruoyi.system.domain.CreditWaterActivity;
import com.ruoyi.system.service.ICreditWaterActivityService;

/**
 * 护水活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-26
 */
@Service
public class CreditWaterActivityServiceImpl implements ICreditWaterActivityService
{
    @Autowired
    private CreditWaterActivityMapper creditWaterActivityMapper;

    /**
     * 查询护水活动
     * 
     * @param activityId 护水活动主键
     * @return 护水活动
     */
    @Override
    public CreditWaterActivity selectCreditWaterActivityByActivityId(Long activityId)
    {
        return creditWaterActivityMapper.selectCreditWaterActivityByActivityId(activityId);
    }

    /**
     * 查询护水活动列表
     * 
     * @param creditWaterActivity 护水活动
     * @return 护水活动
     */
    @Override
    public List<CreditWaterActivity> selectCreditWaterActivityList(CreditWaterActivity creditWaterActivity)
    {
        return creditWaterActivityMapper.selectCreditWaterActivityList(creditWaterActivity);
    }

    /**
     * 新增护水活动
     * 
     * @param creditWaterActivity 护水活动
     * @return 结果
     */
    @Override
    public int insertCreditWaterActivity(CreditWaterActivity creditWaterActivity)
    {
        return creditWaterActivityMapper.insertCreditWaterActivity(creditWaterActivity);
    }

    /**
     * 修改护水活动
     * 
     * @param creditWaterActivity 护水活动
     * @return 结果
     */
    @Override
    public int updateCreditWaterActivity(CreditWaterActivity creditWaterActivity)
    {
        return creditWaterActivityMapper.updateCreditWaterActivity(creditWaterActivity);
    }

    /**
     * 批量删除护水活动
     * 
     * @param activityIds 需要删除的护水活动主键
     * @return 结果
     */
    @Override
    public int deleteCreditWaterActivityByActivityIds(Long[] activityIds)
    {
        return creditWaterActivityMapper.deleteCreditWaterActivityByActivityIds(activityIds);
    }

    /**
     * 删除护水活动信息
     * 
     * @param activityId 护水活动主键
     * @return 结果
     */
    @Override
    public int deleteCreditWaterActivityByActivityId(Long activityId)
    {
        return creditWaterActivityMapper.deleteCreditWaterActivityByActivityId(activityId);
    }
} 